<extend name="common:base" />
<block name="content">
		<div id="header">
	        <div class="header">
	            <h1 class="tit">设置管理</h1>
	            <!--<p class="goback">-->
	                <!--<a class="return" href="javascript:history.go(-1);window.location.href=document.referrer;">返回</a>-->
	                <!--<a class="close" href=""></a>-->
	            <!--</p>-->
	            <!--<p class="more"><a class="share" href=""></a></p>-->
	        </div>
	    </div>
	    <div class="grqm">
	        <textarea placeholder="个性签名" id="message">{$self['signature']}</textarea>
	        <p>120</p>
	    </div>
	    <input type="button" value="保存" class="grxq-btn" id="save"/>
</block>
<block name="CSS">
    <link rel="stylesheet" href="{:C('__STATIC__')}{$theme}/Static/{:C('css')}/total.css" />
    <style>body {background: #f7f7fa;}</style>
</block>
<block name="JS">
    <script type="text/javascript">
        $(function() {
          $('#save').click(function(e) {
            var message = $('#message').val();
            if (message == '') {layer.msg('请填写个性签名!', {icon: 2,time:1000});return false;}

            $.ajax({
                url: "{:U('Setting/edit_message')}",
                type: 'post',
                data:{
                    'message':message
                },
                success: function(msg) {
                    if (msg == 1) {
                        layer.msg('修改成功!', {icon: 1,time:1000});
                    }
                 }
            });
              e.preventDefault();
          });
        });
    </script>
</block>
